package cn.luowb.checkchat.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;

/**
 * 帖子
 *
 * @TableName post
 */
@Data
@TableName(value = "post")
@Accessors(chain = true)
public class PostDO {
    /**
     * 帖子ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 发帖用户ID
     */
    @TableField(value = "uid")
    private Long uid;

    /**
     * 分类ID
     */
    @TableField(value = "cate_id")
    private Long cateId;

    /**
     * 标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 媒体资源（JSON格式存储图片/视频等）
     */
    @TableField(value = "media")
    private String media;

    /**
     * 浏览量
     */
    @TableField(value = "read_count")
    private Integer readCount;

    /**
     * 评论量
     */
    @TableField(value = "comment_count")
    private Integer commentCount;

    /**
     * 点赞量
     */
    @TableField(value = "like_count")
    private Integer likeCount;

    /**
     * 收藏量
     */
    @TableField(value = "collection_count")
    private Integer collectionCount;


    /**
     * 是否置顶：0-否 1-是
     */
    @TableField(value = "post_top")
    private Integer postTop;

    /**
     * 状态：0-封禁 1-正常
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;
}